<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。
	pageContext.setAttribute("basePath",basePath);
%>
<form action="${param.action}" method="post" id="id_cade_form">
	<div class="custom-form">
		<ul>
			<li><span>班级名称：</span><input name="name" id="name"  type="text" class="easyui-textbox"   value="${param.name}" data-options="validType:['length[1,50]','htmlUnescape']" /></li>
			<li><span>入学年：</span><input name="year" class="easyui-numberbox"  value="${param.year}" data-options=""/></li>
			<li><span>所属部门：</span><input  name="parentdept.id" type="text" class="easyui-combotree" value="${param.parentdept.id }" data-options="required:true,url:'sys/dept/comboTree?sort=sort,asc',valueField:'id',textField:'name',method:'get',icons:[clearInput_icon]" /></li>
			<li><span>班主任：</span><input  name="manager.id" type="text" class="easyui-combotree" value="${param.manager.id }" data-options="url:'sys/user/combotree',icons:[clearInput_icon],onBeforeSelect:function(node){return $(this).tree('isLeaf',node.target);}" /></li>
			<c:choose>
				<c:when test="${param.isUsed==null}">
					<li><span>是否在校：</span><input name="isUsed" type="text"  value="true" class="easyui-combotree" data-options="data:[{id:'true',text:'是'},{id:'false',text:'否'}],panelwidth:'auto',icons:[clearInput_icon]" /></li>
				</c:when>
				<c:otherwise>
					<li><span>是否在校：</span><input name="isUsed" type="text"  value="${param.isUsed}" class="easyui-combotree" data-options="data:[{id:'true',text:'是'},{id:'false',text:'否'}],panelwidth:'auto',icons:[clearInput_icon]" /></li>
				</c:otherwise>
			</c:choose>
		</ul>
	</div>
</form>
